//
//  SettingCell.m
//  soccer
//
//  Created by 上官千城 on 15/9/3.
//  Copyright (c) 2015年 上官千城. All rights reserved.
//

#import "OSettingCell.h"
#define item WIDTH/6

@implementation OSettingCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self && [reuseIdentifier isEqualToString:@"myTeamCell"]) {
        [self creatTeamCell];
    }
    if (self && [reuseIdentifier isEqualToString:@"myPlayerCell"]) {
        [self creatPlayerCell];
    }
    return self;
}
//创建teamCell
-(void)creatTeamCell
{
    UILabel *photo = [[UILabel alloc]initWithFrame:CGRectMake(0, self.contentView.frame.size.height/2, 20, 30)];
    photo.text = @"球队";
    //    [self.contentView addSubview:photo];
    NSLog(@"%f ---- @%f",WIDTH / 5,item);
    self.starImg1 = [[UIImageView alloc]initWithFrame:CGRectMake(20 , photo.frame.origin.y - 10, item -15, item -15)];
    //    self.starImg1.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.starImg1];

    
    self.starImg2 = [[UIImageView alloc]initWithFrame:CGRectMake(self.starImg1.frame.origin.x + self.starImg1.frame.size.width+20, self.starImg1.frame.origin.y, self.starImg1.frame.size.width,self.starImg1.frame.size.height )];
    //    self.starImg2.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.starImg2];
    
    self.starImg3 = [[UIImageView alloc]initWithFrame:CGRectMake(self.starImg2.frame.origin.x + self.starImg2.frame.size.width+20, self.starImg2.frame.origin.y, self.starImg1.frame.size.width,self.starImg1.frame.size.height)];
    //    self.starImg3.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.starImg3];
    
    self.starImg4 = [[UIImageView alloc]initWithFrame:CGRectMake(self.starImg3.frame.origin.x + self.starImg3.frame.size.width+20, self.starImg3.frame.origin.y, self.starImg1.frame.size.width,self.starImg1.frame.size.height)];
    //    self.starImg4.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.starImg4];
    
    self.starImg5 = [[UIImageView alloc]initWithFrame:CGRectMake(self.starImg4.frame.origin.x + self.starImg4.frame.size.width+20, self.starImg4.frame.origin.y, self.starImg1.frame.size.width,self.starImg1.frame.size.height)];
    //    self.starImg5.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.starImg5];
    
    self.teamName1 = [[UILabel alloc]initWithFrame:CGRectMake(self.starImg1.frame.origin.x - 10, self.starImg1.frame.origin.y + self.starImg1.frame.size.height, self.starImg1.frame.size.width+20, 20)];
//    self.teamName1.backgroundColor = [UIColor orangeColor];
    self.teamName1.textAlignment = NSTextAlignmentCenter;
    self.teamName1.text = @"皇家马德里";
    self.teamName1.font = [UIFont systemFontOfSize:13* Proportion];
    [self.contentView addSubview:self.teamName1];
    
    self.teamName2 = [[UILabel alloc]initWithFrame:CGRectMake(self.starImg2.frame.origin.x - 10, self.starImg2.frame.origin.y + self.starImg2.frame.size.height, self.starImg2.frame.size.width+20, 20)];
//    self.teamName2.backgroundColor = [UIColor orangeColor];
    self.teamName2.textAlignment = NSTextAlignmentCenter;
    self.teamName2.text = @"皇家马德里";
    self.teamName2.font = [UIFont systemFontOfSize:13* Proportion];
    [self.contentView addSubview:self.teamName2];
    
    self.teamName3 = [[UILabel alloc]initWithFrame:CGRectMake(self.starImg3.frame.origin.x - 10, self.starImg3.frame.origin.y + self.starImg3.frame.size.height, self.starImg3.frame.size.width+20, 20)];
//    self.teamName3.backgroundColor = [UIColor orangeColor];
    self.teamName3.textAlignment = NSTextAlignmentCenter;
    self.teamName3.text = @"皇家马德里";
    self.teamName3.font = [UIFont systemFontOfSize:13* Proportion];
    [self.contentView addSubview:self.teamName3];
    
    self.teamName4 = [[UILabel alloc]initWithFrame:CGRectMake(self.starImg4.frame.origin.x - 10, self.starImg4.frame.origin.y + self.starImg4.frame.size.height, self.starImg4.frame.size.width+20, 20)];
//    self.teamName4.backgroundColor = [UIColor orangeColor];
    self.teamName4.textAlignment = NSTextAlignmentCenter;
    self.teamName4.text = @"皇家马德里";
    self.teamName4.font = [UIFont systemFontOfSize:13* Proportion];
    [self.contentView addSubview:self.teamName4];
    

    
    self.starImg1.image = [UIImage imageNamed:@"402@2x"];
    self.starImg2.image = [UIImage imageNamed:@"403@2x"];
    self.starImg3.image = [UIImage imageNamed:@"401@2x"];
    self.starImg4.image = [UIImage imageNamed:@"403@2x"];
    self.starImg5.image = [UIImage imageNamed:@"注册详情页_09@2x"];
    
    
}
//创建playCell
-(void)creatPlayerCell
{
    UILabel *photo = [[UILabel alloc]initWithFrame:CGRectMake(0, self.contentView.frame.size.height/2, 20, 30)];
    photo.text = @"相册";
    //    [self.contentView addSubview:photo];
    
    self.img1 = [[UIImageView alloc]initWithFrame:CGRectMake(20 , photo.frame.origin.y-10, item - 15 , item -15 )];
    //    self.img1.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.img1];
    
    self.img2 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img1.frame.origin.x + self.img1.frame.size.width+20, self.img1.frame.origin.y, self.img1.frame.size.width,self.img1.frame.size.height )];
    //    self.img2.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.img2];
    
    self.img3 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img2.frame.origin.x + self.img2.frame.size.width+20, self.img2.frame.origin.y, self.img1.frame.size.width,self.img1.frame.size.height)];
    //    self.img3.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.img3];
    
    self.img4 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img3.frame.origin.x + self.img3.frame.size.width+20, self.img3.frame.origin.y, self.img1.frame.size.width,self.img1.frame.size.height)];
    //    self.img4.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.img4];
    
    self.img5 = [[UIImageView alloc]initWithFrame:CGRectMake(self.img4.frame.origin.x + self.img4.frame.size.width+20, self.img4.frame.origin.y, self.img1.frame.size.width,self.img1.frame.size.height)];
    //    self.img5.backgroundColor = [UIColor blueColor];
    [self.contentView addSubview:self.img5];
    
    self.imgName1 = [[UILabel alloc]initWithFrame:CGRectMake(self.img1.frame.origin.x - 10, self.img1.frame.origin.y + self.img1.frame.size.height, self.img1.frame.size.width+20, 20)];
//    self.imgName1.backgroundColor = [UIColor orangeColor];
    self.imgName1.textAlignment = NSTextAlignmentCenter;
    self.imgName1.text = @"皇家马德里";
    self.imgName1.font = [UIFont systemFontOfSize:13*Proportion];
    [self.contentView addSubview:self.imgName1];
    
    self.imgName2 = [[UILabel alloc]initWithFrame:CGRectMake(self.img2.frame.origin.x - 10, self.img2.frame.origin.y + self.img2.frame.size.height, self.img2.frame.size.width+20, 20)];
//    self.imgName2.backgroundColor = [UIColor orangeColor];
    self.imgName2.textAlignment = NSTextAlignmentCenter;
    self.imgName2.text = @"皇家马德里";
    self.imgName2.font = [UIFont systemFontOfSize:13*Proportion];
    [self.contentView addSubview:self.imgName2];
    
    self.imgName3 = [[UILabel alloc]initWithFrame:CGRectMake(self.img3.frame.origin.x - 10, self.img3.frame.origin.y + self.img3.frame.size.height, self.img3.frame.size.width+20, 20)];
//    self.imgName3.backgroundColor = [UIColor orangeColor];
    self.imgName3.textAlignment = NSTextAlignmentCenter;
    self.imgName3.text = @"皇家马德里";
    self.imgName3.font = [UIFont systemFontOfSize:13*Proportion];
    [self.contentView addSubview:self.imgName3];
    
    self.imgName4 = [[UILabel alloc]initWithFrame:CGRectMake(self.img4.frame.origin.x - 10, self.img4.frame.origin.y + self.img4.frame.size.height, self.img4.frame.size.width+20, 20)];
//    self.imgName4.backgroundColor = [UIColor orangeColor];
    self.imgName4.textAlignment = NSTextAlignmentCenter;
    self.imgName4.text = @"皇家马德里";
    self.imgName4.font = [UIFont systemFontOfSize:13*Proportion];
    [self.contentView addSubview:self.imgName4];
    
    
    self.img1.image = [UIImage imageNamed:@"2013103109282582218_02@2x"];
    self.img2.image = [UIImage imageNamed:@"2013103109282582218_02@2x"];
    self.img3.image = [UIImage imageNamed:@"2013103109282582218_02@2x"];
    self.img4.image = [UIImage imageNamed:@"2013103109282582218_02@2x"];
    self.img5.image = [UIImage imageNamed:@"注册详情页_09@2x"];
    

}


@end
